package com.wky.org.pojo;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.wky.basic.query.BaseQuery;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Department extends BaseQuery {
    private String sn;
    private String name;
    private String dirPath;
    private Integer state;

    private Long managerId;
    // 部门领导
    private Employee manager;
    private Long parentId;
    // 上级部门
    private Department parent;
    // 级联部门
    @JsonInclude(JsonInclude.Include.NON_EMPTY) // 如果为空则不返回
    private List<Department> children = new ArrayList<>();
}
